package com.ssy.lingxi.member.merchant.model.vo.login.request;

import com.ssy.lingxi.member.merchant.handler.annotation.PhoneCheckClassAnnotation;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.io.Serializable;
import java.util.Map;

/**
 * App - 会员注册接口参数
 * @author 万宁
 * @version 2.0.0
 * @date 2020-12-04
 */
@PhoneCheckClassAnnotation
public class MobileRegisterVO implements Serializable {
    private static final long serialVersionUID = 8343911257957768029L;

    /**
     * 国家代码（手机号码前缀）
     */
    @NotBlank(message = "国家代码不能为空")
    private String countryCode;

    /**
     * 手机号码
     */
    @NotBlank(message = "手机号码不能为空")
    private String phone;

    /**
     * 注册来源：8-APP企业商城，9-APP渠道商城，10-APP渠道自有商城，11-APP积分商城，12-APP渠道积分商城
     */
    @NotNull(message = "注册来源不能为空")
    @Range(min = 8, max=12, message = "注册来源：8-APP企业商城，9-APP渠道商城，10-APP渠道自有商城，11-APP积分商城，12-APP渠道积分商城")
    private Integer registerSource;

    /**
     * 短信验证码
     */
    @NotBlank(message = "请输入短信验证码")
    private String smsCode;

    /**
     * 用户密码
     */
    @NotBlank(message = "密码不能为空")
    private String password;

    /**
     * 邮箱
     */
    @Email(message = "请输入正确的邮箱")
    private String email;

    /**
     * 会员类型id
     */
    @NotNull(message = "会员类型id要大于0")
    @Positive(message = "会员类型id要大于0")
    private Long memberTypeId;

    /**
     * 会员业务类型id
     */
    @NotNull(message = "会员业务类型id要大于0")
    @Positive(message = "会员业务类型id要大于0")
    private Long businessTypeId;

    /**
     * 会员注册资料，Map对象类型
     * Key为获取页面内容接口返回的fieldName，value为用户填写的内容
     */
    private Map<String, Object> detail;

    public String getCountryCode() {
        return countryCode;
    }

    public void setCountryCode(String countryCode) {
        this.countryCode = countryCode;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getRegisterSource() {
        return registerSource;
    }

    public void setRegisterSource(Integer registerSource) {
        this.registerSource = registerSource;
    }

    public String getSmsCode() {
        return smsCode;
    }

    public void setSmsCode(String smsCode) {
        this.smsCode = smsCode;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Long getMemberTypeId() {
        return memberTypeId;
    }

    public void setMemberTypeId(Long memberTypeId) {
        this.memberTypeId = memberTypeId;
    }

    public Long getBusinessTypeId() {
        return businessTypeId;
    }

    public void setBusinessTypeId(Long businessTypeId) {
        this.businessTypeId = businessTypeId;
    }

    public Map<String, Object> getDetail() {
        return detail;
    }

    public void setDetail(Map<String, Object> detail) {
        this.detail = detail;
    }
}
